import React, { Component } from 'react'
import ProductItem from '../productItem/index'
import {connect} from 'react-redux';
var Row = require('antd/lib/row')
var Col = require('antd/lib/col')

class ListTwo extends Component {
    constructor(props) {
        super(props);
    };

    render() {
    	return (
    			<div className='list-two'>
                    <Row gutter={16}>{
                      this.props.listData.map((item,index)=>(
                         <Col span={this.props.home.isFb ? 6 : 12} key={index}>
                            <div>
                              <ProductItem productinfo={item}/>
                            </div> 
                         </Col>
                                  
                        ))
                    }
                    </Row>
    			</div>
    		)
        }
}

const mapStateToProps = ({home}) => ({
    home
});

const mapDispatchToProps = (dispatch) => {
    return {}
};
export default connect(mapStateToProps, mapDispatchToProps)(ListTwo)